<?php get_header();?>
<!-- Trang nha hang -->
<body>
<div id="wrapper">
	<?php require_once TEMPLATEPATH.'/views/view-header.php';?>
    <?php require_once TEMPLATEPATH.'/views/view-menu.php';?>
    <div id="header-third">
    		<!--slideshow-->
 		   	<?php require_once TEMPLATEPATH.'/views/view-slide-show.php';?>
		    <!--end slideshow--> 
            <!--container-->
         <div id="container">
         <?php require_once TEMPLATEPATH.'/views/view-breadcrumb.php';?>
         <div class="clear"></div>
         <!--main content-->
            <div id="maincontent">
            	<?php 
            	the_post();
            	$post_id = get_the_ID();
            	$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');
            	$title = get_the_title($post_id);
            	$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
            	$perlink = get_permalink($post_id);
            	if(!$alt)
            		$alt = db_vietnamese_slug($title);
            	$destination_from = get_post_meta($post_id,$wpdb->prefix.'destination_from',true);
            	$destination_to = get_post_meta($post_id,$wpdb->prefix.'destination_to',true);
            	$lenght_of_stay = get_post_meta($post_id,$wpdb->prefix.'lenght_of_stay',true);
            	?>
            	
            	<div id="page-hotels-price" class="tour-dataile-04-1">
                <h3><?php the_title();?></h3>             
                <div class="content-hotels-price">
                <img src="<?php echo $thumbnail;?>" alt="<?php echo $alt;?>" />
                <!-- <h4>Hanoi - Halong Bay - Hoi An - Ho Chi Minh City - Cu Chi - Mekong Delta</h4> -->
               <p><strong>Destination from </strong>
               	<?php echo $destination_from;?>
               </p>
				<p><strong>Destination to :</strong><?php echo $destination_to;?></p>
                <p><strong>Lenght of stay: </strong>  <?php echo $lenght_of_stay;?></p>
           			<?php 
           			the_content();
           			?>
                </div>
                <div class="fivetab">
                <ul class="menu-info">
	            	<li><a <?php echo $m_price;?> href="<?php echo $perlink;?>?tab=price">Price</a></li>
	                <li><a <?php echo $m_schedule;?> href="<?php echo $perlink;?>?tab=schedule">Tour Schedule</a></li>
	                <li><a <?php echo $m_term_condition;?> href="<?php echo $perlink;?>?tab=term-condition">Terms & Conditions </a></li> 
	                <li><a <?php echo $m_views;?> href="<?php echo $perlink;?>?tab=views">Guest Reviews</a></li>               
	                <li><a <?php echo $m_similar;?> class="last" href="<?php echo $perlink;?>?tab=similar">Similar Tours </a></li>
	            </ul>
            	
            	<!-- ++++++++ -->
            	
            	<?php 
            	if(isset($_GET['tab']) && $_GET['tab']!=null)
				{
					if($_GET['tab']=='views')
					{
						include TEMPLATEPATH.'/views/view-tour-views.php';
					}
					else if($_GET['tab']=='schedule')
					{
						include TEMPLATEPATH.'/views/view-tour-schedule.php';
					}
					else if($_GET['tab']=='term-condition')
					{
						include TEMPLATEPATH.'/views/view-tour-condition.php';
					}
					else if($_GET['tab']=='similar')
					{
						include TEMPLATEPATH.'/views/view-tour-similar.php';
					}
					else 
					{
						include TEMPLATEPATH.'/views/view-tour-price.php';		
					}
				} 
				else 
				{
					wp_redirect(bloginfo('home').'/404');
				}           	
            	?>
            	
            	<!-- ++++++++ -->
            	
                </div>
                </div>
            	
                
                
            </div>
            <!--main content-->
            <!--sidebar-right-->
            <?php get_sidebar();?> 
            <!--sidebar-right-->
            <div class="clear"></div> 
        </div>
        <!--container-->
        <!--bgfooter-->
<?php get_footer();?>
          